{__NOLAYOUT__}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title></title>
	{include file="public/script" /}
</head>
<body>
	<div class="sectionH  sectionH2 mui-clearfix">
		<header class="mui-bar mui-bar-nav" style="">
			<a class="mui-icon mui-icon-left-nav  mui-pull-left" href="{:url('Connection/index')}" style="color: #727272;"></a>
			<h1 class="mui-title">商会动态</h1>
			<!--<a class="mui-icon mui-pull-right right1" href="assets-1.html"><img src="images/icon_setting.png"/></a>-->
		</header>
	</div>
	<div class="kong1"></div>
	<div class="lian_news_section11">
		<div class="container mui-clearfix">
			<ul>
				{volist name="category" id="c"}
				<a href="{:url('Bussiness/bussinessNewsList',array('category_id'=>$c.id,'bussiness_id'=>$bussiness_id))}">
					<li {if condition="$cid==$c.id"}class="select"{/if}>{$c.title}</li>
				</a>
				{/volist}
			</ul>
		</div>
	</div>
	<div class="kong1"></div>
	<div class="lian_news_section3">
		<div class="index_section3_2 select" id="items" style="position: absolute;	z-index: 2;	width: 100%;height: 85%;">
			<div class="items" style="position: absolute;width: 100%;z-index: 1;">
				<ul class="bmn" style="position: relative;">
					{volist name="list" id="l"}
					<li class="bmw">
						<div class="items_1">
							<a href="{:url('Index/newsInfo',array('id'=>$l.id))}">
								<div class="container">
									<div class="items_1-1">
										<p>{$l.title}</p>
									</div>
									<div class="items_1-2 mui-clearfix">
										<div class="items_1-2-1">
											<div class="items_1-2-1-1">
												<p class="p1">{$l.description}</p>
											</div>
											<p class="p2 mui-clearfix">
												<span class="s1">{:config('article_tag')[$l.tag_id]}</span>
												<span class="s2"><img src="__STATIC__/www/images/home_news_icon_read.png"/> {$l.view_num}</span>
											</p>
										</div>
										<div class="items_1-2-2">
											<img src="{$l.thumb}"/>
										</div>
									</div>
								</div>
							</a>
						</div>
					</li>
					{/volist}
				</ul>

			</div>
			
		</div>
	</div>
	
	
</body>


<script>
	mui.init({
		pullRefresh: {
			container: '#items',
			down: {
				
			},
			up: {
				auto:false,
				contentrefresh: '正在加载...',
				callback: pullupRefresh
			}
		}
	});
	
	var cid = "{$cid}";
    var bussiness_id = "{$bussiness_id}";
	var count = 1;
	function pullupRefresh() {
		setTimeout(function() {
			// mui('#items').pullRefresh().endPullupToRefresh((++count > 2)); //参数为true代表没有更多数据了。
			var table = document.body.querySelector('.bmn');
			var url="{:url('Bussiness/bussinessNewsList')}";
            count++;
			$.post(url,{page:count,page_size:5,category_id:cid,bussiness_id:bussiness_id},function(data){
			    var data=JSON.parse(data);
                if(data==0)
                {
                    mui('#items').pullRefresh().endPullupToRefresh((data==0));
                }else{
                    var tag_arr='<?php echo json_encode(config("article_tag")); ?>';
                    tag_arr=JSON.parse(tag_arr);
                    for (var i = 0; i < data.length; i++) {
                        var li = document.createElement('li');
                        var tag_id=data[i]["tag_id"];
                        var tag=tag_arr[tag_id];
						var url1="/Index/newsInfo/id/"+data[i]["id"];
                        li.className = 'bmw';
                        li.innerHTML = '<div class="items_1"><a href="'+url1+'"><div class="container"><div class="items_1-1"><p>'+data[i]["title"]+'</p></div><div class="items_1-2 mui-clearfix"><div class="items_1-2-1"><div class="items_1-2-1-1"><p class="p1">'+data[i]["description"]+'</p></div><p class="p2 mui-clearfix"><span class="s1">'+tag+'</span><span class="s2"><img src="__STATIC__/www/images/home_news_icon_read.png"/>'+data[i]["view_num"]+'</span></p></div><div class="items_1-2-2"><img src="'+data[i]["thumb"]+'"/></div></div></div></a></div>';
                        table.appendChild(li);

                    }

				}
                mui('#items').pullRefresh().endPullupToRefresh((data==0));
			})

		}, 1000);
	}
</script>
<script type="text/javascript">
	$(function(){
		$(".lian_news_section11 li").click(function(){
			$(this).addClass("select").siblings().removeClass("select");
			var dd = $(this).index();
			$(".index_section3_2").eq(dd).addClass("select").siblings().removeClass("select")
		})
	})
</script>


</html>